<%@ tag body-content="scriptless" pageEncoding="UTF-8"%>
<%@ tag import="com.opesoft.fw.core.utils.TagUtils"%>
<%@ attribute name="value" rtexprvalue="true" required="true"%>
<%@ attribute name="style" rtexprvalue="true" required="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
JspContext parent=TagUtils.getParentJspContext(this,"select");
Object obj=parent.getAttribute("value");
if(obj!=null)
	jspContext.setAttribute("defaultValue",obj.toString());
%>

<option value="${value}"
<c:if test="${style!=null}">style="${style}"</c:if>
<c:if test="${value eq defaultValue}">selected</c:if>
>
